What is the Perl equivalent to C's #include? [closed]

Posted by Herms on Stack Overflow See other posts from Stack Overflow or by Herms
Published on 2010-04-28T14:23:30Z Indexed on 2010/04/28 15:53 UTC
Read the original article Hit count: 225

Filed under:
|

Possible Duplicate:
How do I include functions from another file in my Perl script?

I have a couple simple perl scripts that share some subroutines. I'd like to pull those subroutines out into another file, but I'm not sure how to go about doing that.

All I need is an equivalent to C's #include. I found a couple things online about creating modules, but that seems like overkill for what I'm doing.

Is there a way to just tell perl to load/execute another perl script inline, so it's treated as if it's just part of the file (like #include in C)?

© Stack Overflow or respective owner

Related posts about perl

Related posts about include